<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<!--  引入css  -->
    <link rel="stylesheet" href="bower_components/layer/skin/default/layer.css">
    <link rel="stylesheet" href="bower_components/ztree/css/metroStyle/metroStyle.css"/>
</head>
<body>
<div></div>
<!-- 引入js -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="bower_components/ztree/jquery.ztree.all.min.js"></script>
<script type="text/javascript" src="bower_components/layer/layer.js"></script>
<script>
    //简单zTree配置
    var setting = {
        data: {
            simpleData: {
                enable: true,
                idKey: "id",
                pIdKey: "parentId",
                rootPId: 0
            }
        }
    };
    $.ajax({
        url:"/menu/doFindZtreeMenuNodes",
        success(result){
            //初始化zTree(参考官网http://www.treejs.cn/)
            //基于setting配置将返回的数据在treeDemo位置进行呈现
            $.fn.zTree.init($("#treeDemo"),setting,result.data);
        }
    })
</script>
</body>
</html>